//
//  OrderDetailTableViewCell.m
//  UEAssistant
//
//  Created by mac on 2017/1/23.
//  Copyright © 2017年 youyixinxi. All rights reserved.
//

#import "OrderDetailTableViewCell.h"

NSString *orderDetailCell = @"orderDetailTableViewCll";

@interface OrderDetailTableViewCell ()<UITextViewDelegate>

@property (nonatomic, strong) UITextView   *textView;

@end

@implementation OrderDetailTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];

}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

- (void)layoutSubviews{
    [super layoutSubviews];
    
}

- (void)removeInfoObjReplaceWithTextView{

    [self.infoLabel setHidden:YES];
    if (Screen_Width == 320) {
        _textView = [[UITextView alloc]initWithFrame:CGRectMake(self.titleName.frame.origin.x + self.titleName.frame.size.width + 15 - 20, self.titleName.frame.origin.y-5, Screen_Width - 40 -self.titleName.frame.size.width - 30, 150)];
    }else{
        _textView = [[UITextView alloc]initWithFrame:CGRectMake(self.titleName.frame.origin.x + self.titleName.frame.size.width + 15, self.titleName.frame.origin.y-5, Screen_Width - 40 -self.titleName.frame.size.width - 30, 150)];
    }
    _textView.backgroundColor = [UIColor whiteColor];
    _textView.delegate = self;
    _textView.textColor = [UIColor grayColor];
    _textView.scrollEnabled = NO;
    _textView.editable = NO;
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    NSDictionary *attributes = @{
                                     NSFontAttributeName:[UIFont systemFontOfSize:FLEXIBLE(15)],
                                     NSParagraphStyleAttributeName:paragraphStyle
                                     };
    _textView.attributedText = [[NSAttributedString alloc] initWithString:@"base" attributes:attributes];
    _textView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
    [self addSubview:_textView];
}

- (void)removeInfoObj{

    [self.titleName removeFromSuperview];
    [self.infoLabel removeFromSuperview];
}


- (void)cellHeight:(NSInteger)height{

}

@end
